import React, { useState } from 'react';
import { Form, Descriptions, Modal, Radio, TreeSelect } from 'antd';
import { FormValueType, TreeNode } from '../data.d';

const FormItem = Form.Item;

export interface DetailFormProps {
  onCancel: () => void;
  updateModalVisible: boolean;
  values: FormValueType;

}

const formLayout = {
  labelCol: { span: 5 },
  wrapperCol: { span: 15 },
};

const UpdateForm: React.FC<DetailFormProps> = (props) => {
  const [formVals] = useState<FormValueType>(props.values);

  const [form] = Form.useForm();

  const { updateModalVisible,  onCancel,} = props;


  return (
    <Modal
      width={640}
      destroyOnClose
      title="日志详情"
      visible={updateModalVisible}
      footer={null}
      onCancel={() => onCancel()}
    >
  
   
           <Descriptions  column={1} >
              <Descriptions.Item label="操作人">{formVals.userName}</Descriptions.Item>
              <Descriptions.Item label="操作时间">{formVals.createTime}</Descriptions.Item>
              <Descriptions.Item label="操作ip">{formVals.machineIp}</Descriptions.Item>
              <Descriptions.Item label="模块名称">{formVals.moduleName}</Descriptions.Item>
              <Descriptions.Item label="操作">{formVals.operationName}</Descriptions.Item>
              <Descriptions.Item label="参数">{formVals.moduleData}</Descriptions.Item>
            </Descriptions>

    
    </Modal>
  );
};

export default UpdateForm;
